package com.ethink.warehouse.api.request;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 物流跟进单 更新流程请求对象
 *
 * @author default
 * @date 2022-11-10
 */
@Data
public class LogisticsTraceOrderUpdateStepRequest {

    @Schema(description ="主键")
    private Long id;

    @Schema(description ="提单号")
    private String takeOrderNo;

    @Schema(description ="始发国")
    private String sourceCountry;

    @Schema(description ="始发港")
    private String sourcePort;

    @Schema(description ="目的国")
    private String targetCountry;

    @Schema(description ="目的港")
    private String targetPort;

    @Schema(description ="货代物流")
    private String expressCompany;

    @Schema(description ="运输方式")
    private String transportModel;

    @Schema(description ="送货模式")
    private String deliveryModel;

    @Schema(description ="托")
    private String torr;

    @Schema(description ="箱")
    private String box;

    @Schema(description ="预计发货日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date expireFhTime;

    @Schema(description ="实际发货日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date actualFhTime;

    @Schema(description ="预计到港日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date expireDgTime;

    @Schema(description ="实际到港日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date actualDgTime;

    @Schema(description ="预计到仓日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date expireDcTime;

    @Schema(description ="实际到仓日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date actualDcTime;

    @Schema(description ="实际理货日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date actualLhTime;

    @Schema(description ="实际上架日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date actualSjTime;

    @Schema(description ="运输费用")
    private BigDecimal transportCostAmt;

    @Schema(description ="打托资料附件")
    private String packageFileId;

    @Schema(description ="理货报告附件")
    private String confirmFileId;

    @Schema(description ="备注信息")
    private String remark;

    @Schema(description = "确认明细")
    private List<LogisticsTraceOrderUpdateStepRequestMateItem> confirmItems;

    @Data
    public static class LogisticsTraceOrderUpdateStepRequestMateItem {
        @Schema(description ="申请详单ID")
        private Long applyDetailId;

        @Schema(description ="物流跟进单号")
        private String traceOrderNo;

        @Schema(description ="申请单号")
        private String applyOrderNo;

        @Schema(description ="商品SKU")
        private String mateSku;

        @Schema(description ="分仓编码")
        private String subWarehouseCode;

        @Schema(description ="采购批次")
        private String purchaseCode;

        @Schema(description ="枚举 库存类型:1-正品(zp)|2-瑕疵(cc)")
        private Integer inventoryType;

        @Schema(description ="生产批次")
        private String produceCode;

        @Schema(description ="最终数量(入库/出库)")
        private Integer actualInQty;

        @Schema(description ="库存ID")
        private Long mateInventoryId;

        @Schema(description ="采购单号")
        private String purchaseOrderNo;

        @Schema(description ="采购详单号")
        private String purchaseDetailOrderNo;

        @Schema(description ="成本单价")
        private BigDecimal costPrice;

        @Schema(description ="原产国")
        private String countryOfOrigin;

        @Schema(description ="入库日期")
        private Date operateTime;

        @Schema(description ="商品生产日期")
        @DateTimeFormat(pattern = "yyyy-MM-dd")
        @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
        private Date productDate;

        @Schema(description ="商品过期日期")
        @DateTimeFormat(pattern = "yyyy-MM-dd")
        @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
        private Date expireDate;
    }

}
